<layout name="Layout/layout" />
<div class="row">
	<div class="col-lg-12">
		<h1 class="page-header">用户</h1>
	</div>
	<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				用户列表
			</div>
			<!-- /.panel-heading -->
			<div class="panel-body">
						<div class="dataTable_wrapper">
	<table class="table table-striped table-bordered table-hover" id="dataTables-example">
		<thead>
			<tr>
				<th>ID</th>
				<th>用户名</th>
				<th>姓名</th>
				<th>角色</th>
				<th>修改</th>
				<th>删除</th>
			</tr>
		</thead>
		<tbody>
			<?php 
				foreach($userlist as $k=>$v){
					$trclass = '';
					if($k%2==0){
						$trclass = 'odd';
					}else{
						$trclass = 'even';
					}
					?>
					<tr class="{$trclass}">
						<td>{$v['id']}</td>
						<td>{$v['username']}</td>
						<td>{$v['name']}</td>
						<td>{$v['role_id']}</td>
						<td><a href="{:U("Admin/User/updateuser",array("user_id"=>$v['id']))}">修改</a></td>
						<td><a href="{:U("Admin/User/deleteuser",array("user_id"=>$v['id']))}" id="delete_link" onclick="delete_confirm()">删除</a></td>
					</tr>
					<?php 
				}
			?>
		</tbody>
	</table>
</div>

			<!-- /.panel-body -->
		</div>
		<!-- /.panel -->
	</div>
	<!-- /.col-lg-12 -->
</div>
<script>
	window.onload = function(){
		$(document).ready(function() {
			$('#dataTables-example').DataTable({
					responsive: true
			});
		
		});
	}

</script>